<!DOCTYPE html>

<html>
    <head>
        <title>#{get 'title' /}</title>
        <meta charset="${_response_encoding}">
        <link rel="shortcut icon" type="image/png" href="@{'/public/images/favicon.png'}">
        <link type="text/css" rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700">
        <link rel="stylesheet" media="screen" href="@{'/public/stylesheets/main.css'}">

        <link rel="stylesheet" type="text/css" media="screen" href="@{'/public/stylesheets/play-pagination.css'}"> 

        <link rel="stylesheet" href="http://code.jquery.com/ui/1.9.2/themes/base/jquery-ui.css" />

        #{get 'moreStyles' /}
        <script src="http://code.jquery.com/jquery-1.8.3.js"></script>
        <script src="http://code.jquery.com/ui/1.9.2/jquery-ui.js"></script>
        
        
        
        <script>
		$(function() {
			$( "#from" ).datepicker({
				numberOfMonths: 1,
				onClose: function( selectedDate ) {
					$( "#to" ).datepicker( "option", "minDate", selectedDate );
				}
			});
			$( "#to" ).datepicker({
				defaultDate: "+1w",
				numberOfMonths: 1,
				onClose: function( selectedDate ) {
					$( "#from" ).datepicker( "option", "maxDate", selectedDate );
				}
			});
		});
		</script>
    
		<script type="text/javascript" charset="utf-8">
	    $(function() {         
	        // Expose the form 
	        $('form').click(function() { 
	            $('form').expose({api: true}).load(); 
	        }); 
	        
	        // If there is an error, focus to form
	        if($('form .error').size()) {
	            $('form').expose({api: true, loadSpeed: 0}).load(); 
	            $('form input[type=text]').get(0).focus();
	        }
	    });
		</script>

        #{get 'moreScripts' /}
    </head>
    <body scroll="no">
    
    <div class="container">
    
	    <div class="ust">
	    
	    	<div class="logo"><a href="@{Application.index}"><img src="@{'/public/images/logo.png'}" border="0"> </a></div>
	    	
			<div class="search_ust">
			#{form @Series.search()}
			
			<input class="search-text" type="text" defaultvalue="Search Tv Series" value="Search Tv Series" name="param" onclick="this.value='';">
            <button class="submit-button" type="submit">Search</button>
            
			#{/form} 
			</div>
			
	    	<div class="user_ust"><img src="${userImage}" width="25" height="25" border="0" style="vertical-align:middle;" /> <a href="/myprofile">${facebookName}</a></div>
	    	<div class="series_tab" style="color: #FFF"><a href="@{Application.index}">Homepage</a> &nbsp; | &nbsp; <a href="@{Series.series}">TV Series</a> &nbsp; | &nbsp;<a href="@{TopTen.topten}">Top 10</a> &nbsp; | &nbsp; <a href="@{Schedule.index}">Schedule</a> &nbsp; | &nbsp; <a href="@{Contacts.contact}">Contact</a></div>
	    
	    </div>
	    

    	<div class="alt">
			#{doLayout /}
        </div>
    </div>
    
    
    <div id="fb-root"></div>
	<script src="https://connect.facebook.net/en_US/all.js"></script>
	<script>
	FB.init({appId : '${facebookApplicationID}', status : true, cookie : true, xfbml : true});
	function FacebookInviteFriends()
	{
	FB.ui({
	method: 'apprequests',
	message: 'Come on use our application!!!'
	});
	}
	window.fbAsyncInit = function() { FB.Canvas.setAutoGrow(); }
	
	
	function postToFeed(name, image, description, hrefTitle, hrefLink, userPrompt) {

        // calling the API ...
        var obj = {
          method: 'feed',
          redirect_uri: hrefLink,
          link: hrefLink,
          picture: image,
          name: name,
          caption: hrefTitle,
          description: description
        };

        function callback(response) { }

        FB.ui(obj, callback);
      }
	
	</script>
	
	

<script type="text/javascript">
	function showSpoiler(obj)
    {
	    var inner = obj.parentNode.getElementsByTagName("div")[0];
	    if (inner.style.display == "none")
	        inner.style.display = "";
	    else
	        inner.style.display = "none";
    }
</script>



<script>
      function ModifySelection () {
                var textarea = document.getElementById("comment");
                var newText = "<spoiler>" + textarea.value + "</spoiler>";
                textarea.value = newText;
   	   }
</script>
	
	
    </body>
</html>
